package com.yanqu.road.entity.player;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.Objects;

@FieldTypeAnnotation(tableName = "t_u_goods_resource")
public class GoodsResourData extends DataObject {
    @FieldTypeAnnotation(select = true, update = true)
    private long userId;
    @FieldTypeAnnotation(update = true)
    private int goodsId;
    @FieldTypeAnnotation
    private String resourceFlag;
    private String tagFlag;
    private int linkType;

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public int getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(int goodsId) {
        this.goodsId = goodsId;
    }

    public String getResourceFlag() {
        return resourceFlag;
    }

    public void setResourceFlag(String resourceFlag) {
        if (!Objects.equals(this.resourceFlag, resourceFlag)) {
            this.resourceFlag = resourceFlag;
            setUpdateOption();
        }
    }

    public String getTagFlag() {
        return tagFlag;
    }

    public void setTagFlag(String tagFlag) {
        if (!Objects.equals(this.tagFlag, tagFlag)) {
            this.tagFlag = tagFlag;
            setUpdateOption();
        }
    }

    public int getLinkType() {
        return linkType;
    }

    public void setLinkType(int linkType) {
        if (!Objects.equals(this.linkType, linkType)) {
            this.linkType = linkType;
            setUpdateOption();
        }
    }
}
